#include "session_timer.h"
#include <unistd.h>

namespace secsmart_tcpip
{

static thread_local SessionTimer g_timer;

session_timer_node_t session_timer_add_timer(time_t msec, session_timer_cb_t func, std::shared_ptr<void> arg)
{
    return g_timer.add_timer(msec, func, arg);
}

bool session_timer_del_timer(session_timer_node_t &node)
{
    return g_timer.del_timer(node);
}

bool session_timer_check_timer()
{
    return g_timer.check_timer();
}

int session_timer_get_timer_num()
{
    return g_timer.get_timer_node_num();
}

time_t session_time_to_expire()
{
    return g_timer.time_to_expire();
}

}